Chrysler: fuzzy fingerprint on part numbers, tolerate one unseen part - #3717
Open
ping-dev-ui wants to merge 1 commit into
Open
Chrysler: fuzzy fingerprint on part numbers, tolerate one unseen part#3717ping-dev-ui wants to merge 1 commit into
ping-dev-ui wants to merge 1 commit into
Conversation
Add a brand fuzzy fingerprinting function for Chrysler that matches on Mopar part numbers instead of exact FW strings, so unseen software revisions still fingerprint. One platform code ECU (cluster, SRS, ABS, EPS) may carry an unseen part number, which is what a new model year typically changes; two never match. A test asserts every pair of platforms differs on at least two platform code ECUs so the tolerance cannot confuse sibling platforms.
Contributor
There was a problem hiding this comment.
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- include a route or your device' dongle ID if relevant
Contributor
Car behavior reportReplays driving segments through this PR and compares the behavior to master. Testing 40 segments for: CHRYSLER_PACIFICA_2018_HYBRID, CHRYSLER_PACIFICA_2019_HYBRID, CHRYSLER_PACIFICA_2018, CHRYSLER_PACIFICA_2020 ✅ 0 changed, 40 passed, 0 errors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: Chrysler: fuzzy fingerprint on part numbers, tolerate one unseen part
Closes #1092
Problem
Chrysler FW responses are a Mopar part number plus a software revision (
68227902AF→ part68227902, revisionAF). Today only the generic fuzzy matcher runs for Chrysler, and it needs exact FW strings. A dealer flash that bumpsAF→AGon any ECU therefore makes the car unfingerprintable until someone submits a new route. Simulated on the current Chrysler database (10 platforms, 652 FW versions), a known car whose ECUs report an unseen revision letter fuzzy matches in 0 of 300 trials.Change
Add
match_fw_to_car_fuzzyfor Chrysler in the same shape as the Ford and Hyundai implementations:FW_PATTERNsplits each FW into part number and revision;get_platform_codesreturns the part numbers.Why this is safe
test_platforms_distinguishableasserts that every pair of platforms differs on at least two platform code ECUs, so tolerating one unseen ECU cannot turn one platform into its sibling. Today the closest pairs are Durango / Grand Cherokee 2019 (share ABS and EPS part numbers, differ on cluster and SRS) and Pacifica 2018 / 2020 (share EPS, differ on the other three). The test fails as soon as a future fingerprint submission breaks that margin, which is the signal to revisit the tolerance.Simulation on the full database (script and numbers in the PR discussion):
Tests
opendbc/car/chrysler/tests/test_chrysler.py, modeled on the Ford tests: every FW in the database parses; known FW and unseen revisions match exactly one platform; one unseen part number still matches and never another platform; two unseen part numbers or two missing ECUs never match; the Pacifica 2018/2020 and Durango/Grand Cherokee 2019 sibling cases with an unseen cluster; the distinguishability invariant above.print_platform_codes.pymirrors the Ford/Hyundai helper.Validation
opendbc/car/tests/test_fw_fingerprint.py, which checks the brand function never disagrees with the generic matcher on known FW.Related: #3520 takes the same part-number approach but requires all four ECUs; the numbers above are why this PR tolerates one.